Run Formatter on generated tests#895
Conversation
|
Codeflash Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍(Review updated until commit 65cba54)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 65cba54
Previous suggestionsSuggestions up to commit 60bb705
|
|
Persistent review updated to latest commit 65cba54 |
| formatter_cmds, original_temp, test_dir_str, print_status=False, exit_on_failure=False | ||
| ) | ||
| if not changed: | ||
| return re.sub(r"\n{2,}", "\n\n", formatted_code) |
There was a problem hiding this comment.
nit: Can try to merge line 100 and 111 in 1 then repeating it.
There was a problem hiding this comment.
@Saga4 it's a shortcut the function will take if there are no formatters provided which could happen often
There was a problem hiding this comment.
I've yet to see a project without a formatter, know of any?
PR Type
Enhancement, Bug fix
Description
Add formatter for generated tests
Apply formatting before embedding in markdown
Minor typo fix in comment
Diagram Walkthrough
File Walkthrough
formatter.py
Introduce helper to format generated codecodeflash/code_utils/formatter.py
format_generated_codeto condense blank lines.function_optimizer.py
Apply formatting to generated test snippetscodeflash/optimization/function_optimizer.py
format_generated_code.